<?php
/*
 * @Date: 2021-05-11 22:59:10
 * @Author: yukun
 * @LastEditors: yukun
 * @LastEditTime: 2021-05-11 23:41:41
 * @FilePath: /design-patterns-study/桥接模式/Msg.php
 * @Description: 本文件主要功能为：
 */

abstract class Msg 
{
    protected $sender = null;
    public $content;

    public function __construct($sender)
    {
        $this->sender = $sender;
    }

    abstract public function content($content);

    public function send($to, $content)
    {
        $content = $this->content($content);
        $this->sender->send($to, $content);
    }
}
